find values of a and b that make the function differentiable